Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 🐛 Support 'overrideConfigFile' option for ESLint #745

Merged
merged 1 commit into from
May 11, 2022

Conversation

idahogurl
Copy link
Collaborator

@idahogurl idahogurl commented May 10, 2022

The option of overrideConfigFile does not work because the option overrideConfig, according to the documentation, is applied after overrideConfigFile applied. The values from calculateConfigForFile are placed in the overrideConfigFile option thus overriding the rules obtained from the overrideConfigFile. To fix this, we need to pass overrideConfigFile and other pertinent options to the ESLint instance so when calculateConfigForFile is called then it generates the correct config values.

@codecov-commenter
Copy link

codecov-commenter commented May 10, 2022

Codecov Report

Merging #745 (3e96c3a) into master (c425280) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #745      +/-   ##
==========================================
+ Coverage   99.65%   99.66%   +0.01%     
==========================================
  Files           2        2              
  Lines         287      298      +11     
  Branches       78       88      +10     
==========================================
+ Hits          286      297      +11     
  Misses          1        1              
Impacted Files Coverage Δ
src/utils.js 100.00% <ø> (ø)
src/index.js 99.20% <100.00%> (+0.08%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c425280...3e96c3a. Read the comment docs.

Comment on lines -99 to -101
baseConfig: {
settings: eslintConfig.settings || {}
},
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

settings will be in the overrideConfig option

@idahogurl idahogurl requested review from kylemh and zimme May 10, 2022 03:31
Copy link
Member

@zimme zimme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I've only skimmed the code for obvious breaking stuff.

@idahogurl idahogurl merged commit 3746d67 into master May 11, 2022
@idahogurl idahogurl deleted the accept-eslint-node-api-options branch May 11, 2022 16:02
@github-actions
Copy link
Contributor

🎉 This PR is included in version 14.0.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants